<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var car = {
            color: '红色',
            name: 'infiniti',
            money: 1000000,
            arr:[],
            obj:{},
            func:function(carColor,carName){
                console.log('车的颜色'+carColor)
                console.log('车的名字'+carName)
                console.log('对象中的函数被执行了')

            }

        }
        console.log(car);
        car.func(car.color,car.name);


        var arr = []
        var obj = {}

       
        arr[0] = 1
        arr[0] = 2       
        arr[0] = 3

        obj.a = 10
        obj.a = 20
        obj.a = 30
        console.log(arr)
        console.log(obj)

    </script>
</body>

</html>